<?php

class Application_Form_Frais extends Zend_Form {

    public function init() {
        $this->setName('fraisforfait');

        $id = new Zend_Form_Element_Text('id');
        $id->setLabel('id')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->setAttrib('readonly', 'true')
                ->addValidator('NotEmpty');

        $libelle = new Zend_Form_Element_Text('libelle');
        $libelle->setLabel('Libelle')
                ->setRequired(true)
                ->setAttrib('readonly', 'true')
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEmpty');

        $montant = new Zend_Form_Element_Text('montant');
        $montant->setLabel('Montant')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEmpty');


        $envoyer = new Zend_Form_Element_Submit('envoyer');
        $envoyer->setAttrib('id', 'boutonenvoyer');

        $this->addelements(array($id, $libelle, $montant, $envoyer));
    }

}
